package com.franklin.ideaplugin.maphelper.col.method.impl;

import com.franklin.ideaplugin.maphelper.col.method.IColQueryMethod;
import lombok.Data;

/**
 * @author Ye Junhui
 * @since 2024/3/11
 */
@Data
public class DefaultColQueryMethod implements IColQueryMethod {

    private final String methodName;

    private final int paramCount;

    private final int queryTargetIndex;

    public DefaultColQueryMethod(String methodName, int paramCount, int queryTargetIndex) {
        this.methodName = methodName;
        this.paramCount = paramCount;
        this.queryTargetIndex = queryTargetIndex;
    }

    @Override
    public String getMethodName() {
        return this.methodName;
    }

    @Override
    public int getQueryTargetIndex() {
        return this.queryTargetIndex;
    }

    @Override
    public boolean match(String methodName) {
        return this.methodName.equals(methodName);
    }
}
